package com.gonsin.gview.logic.validate.data;

import com.gonsin.gview.logic.exceptions.BaseGViewException;
import com.gonsin.gview.logic.validate.IModelValidate;
import com.gonsin.gview.logic.validate.ValidateContext;
import com.gonsin.gview.model.data.GListDataModel;

public class ListDataValidate implements IModelValidate<GListDataModel> {
    @Override
    public void validate(ValidateContext context, GListDataModel board) {
        String dataId = board.getDataId();
        if(null == context.getDataService().findDataManagerById(dataId)){
            throw new BaseGViewException("【%s】中的@GSelector onChangeAction 找不到对应的action");
        }
    }
}
